Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS-49: Adding cypress testing framework #68

Merged
merged 8 commits into from
Mar 19, 2020
Merged

Conversation

russom-woldezghi
Copy link
Contributor

@russom-woldezghi russom-woldezghi commented Mar 17, 2020

Ticket

FS-49: Adding cypress testing

Description

  • Adds cypress package to devDependencies
  • Adds setup configuration for cypress
  • Updates scripts in package.json to run cypress
  • Adds cypress.json configuration file
  • Updates README.md
  • Adds some basic test coverage of application
    • Tests if key markups are rendered on the DOM

Testing instruction

  • Pull down code
  • Remove node_modules directory
  • Run yarn install && yarn start
  • Run yarn cypress to start Cypress electron binary. This will open another app to run test.

Screen Shot 2020-03-19 at 11 44 01 AM

  • Click on "Run all specs", this will open a Chrome to run all the steps.
  • Verify tests are running and all tests pass.

Screen Shot 2020-03-19 at 11 49 54 AM

Known issues

  • Verify demo box is running for Solr index to be queried. If not, the test will time out and result in a timeout/error message.

Open questions

  • Should there be more automation in this approach? Would running yarn cypress to run tests be missed for future developers?

  • Cypress requires a cypress.json file to be added with a defined baseUrl with the value localhost:3000. I can see if there are other ports it might cause some confusion. Would we need to look into more abstract solution to handle cases where a developer is on port 3001?

@agentrickard
Copy link
Contributor

This default test only passes if the autocomplete is disabled. I fixed that by changing the selector in the test.

As to the questions:

  1. I think running yarn cypress is fine. Just document it.
  2. Port 3000 is fine. Again, just document that setting.

@russom-woldezghi
Copy link
Contributor Author

russom-woldezghi commented Mar 19, 2020

Your changes looks good. I have also updated the readme file with the items about ports and command to run tests.

@agentrickard agentrickard merged commit 4b560ef into 3.x Mar 19, 2020
@agentrickard agentrickard deleted the FS-49-add-cypress branch March 19, 2020 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants